package com.example.model;

import java.util.*;
import lombok.Data;

import java.util.List;
import java.util.ArrayList;

/**
 * cs
 * 自动生成的实体类
 */
@Data
public class cs {
    /**
     * id
     */
    private Integer id;
    /**
     * name
     */
    private String name;
    /**
     * contact
     */
    private Contact contact;
    /**
     * orders
     */
    private List<Order> orders;
    /**
     * properties
     */
    private Properties properties;

    public cs() {
    }

    public cs(Integer id, String name, Contact contact, List<Order> orders, Properties properties) {
        this.id = id;
        this.name = name;
        this.contact = contact;
        this.orders = orders;
        this.properties = properties;
    }

    public void addOrders(Order item) {
        if (this.orders == null) {
            this.orders = new ArrayList<>();
        }
        this.orders.add(item);
    }

    public void removeOrders(Order item) {
        if (this.orders != null) {
            this.orders.remove(item);
        }
    }
}
